how to calculate ups battery backup time